package com.yaoyong.codegenerator.constant;

/**
 * 替换符常量
 * <p>
 * 用于制作模板
 *
 * @author 姚勇
 */
public class Placeholder {

    /**
     * 尖括号
     */
    public static final String ANGLE_BRACKET_LEFT = "<";
    public static final String ANGLE_BRACKET_RIGHT = ">";
    /**
     * 方括号
     */
    public static final String SQUARE_BRACKETS_LEFT = "[";
    public static final String SQUARE_BRACKETS_RIGHT = "]";

    /**
     * 工程模板内置替换符
     * <p>
     * [project]  项目名称（英文）
     * [projectComment] 项目中文名称
     * [package] 包名  com.wisely.demo
     * [package_path] 全部目录，根据包名产生  com/wisely/demo
     * [author] 作者
     * [path_x]  目录 ，x代表目录级数，从1开始，不需要设置，值根据package产生。比如： path_1: com  path_2:wisely  path_3 :demo
     */
    public static final String PROJECT = "[project]";
    public static final String PROJECT_COMMENT = "[projectComment]";
    public static final String PROJECT_PACKAGE = "[package]";
    public static final String PROJECT_PACKAGE_PATH = "[package_path]";
    public static final String PROJECT_AUTHOR = "[author]";
    public static final String PROJECT_GROUP_ID = "[groupId]";
    public static final String PROJECT_ARTIFACT_ID = "[artifactId]";
    public static final String PROJECT_VERSION = "[version]";
    public static final String[] PROJECT_HIERARCHY_PATH = {"[path_1]", "[path_2]", "[path_3]", "[path_4]", "[path_5]"};

    /**
     * 数据库内置替换符
     * <p>
     * [databaseType] 数据库类型(mysql,oracle)
     * [driverClassName] 数据库驱动
     * [url] 数据库url
     * [dbName] 数据库名称
     * [username] 数据库用户名
     * [password] 数据库密码
     */
    public static final String DB_TYPE = "[databaseType]";
    public static final String DB_DRIVER = "[driverClassName]";
    public static final String DB_URL = "[url]";
    public static final String DB_NAME = "[dbName]";
    public static final String DB_USERNAME = "[username]";
    public static final String DB_PASSWORD = "[password]";

    /**
     * 表级模板内置替换符
     * <p>
     * [table]  表名称（小写开头）
     * [Table]  首字母大写的表名称
     * [tableName]  数据库表名称
     * [tableComment] 表含义
     * [key] 主键名称
     */
    public static final String TABLE_LOWER = "[table]";
    public static final String TABLE_UPPER = "[Table]";
    public static final String TABLE_NAME = "[tableName]";
    public static final String TABLE_COMMENT = "[tableComment]";
    public static final String TABLE_KEY = "[key]";

    /**
     * 列级模板内置替换符
     * <p>
     * [column]  列名称（小写开头）
     * [Column]  首字母大写的列名称
     * [type]  java类中类型
     * [dbType]  数据库中类型
     * [columnComment] 列含义
     */
    public static final String COLUMN_LOWER = "[column]";
    public static final String COLUMN_UPPER = "[Column]";
    public static final String COLUMN_TYPE = "[type]";
    public static final String COLUMN_DB_TYPE = "[dbType]";
    public static final String COLUMN_COMMENT = "[columnComment]";
}
